\hypertarget{classsock_1_1net_1_1_event_loop}{}\section{sock\+:\+:net\+:\+:Event\+Loop Class Reference}
\label{classsock_1_1net_1_1_event_loop}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}


事件循环  




{\ttfamily \#include $<$event\+\_\+loop.\+h$>$}

Inheritance diagram for sock\+:\+:net\+:\+:Event\+Loop\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classsock_1_1net_1_1_event_loop}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structsock_1_1net_1_1_event_loop_1_1_statics}{Statics}
\begin{DoxyCompactList}\small\item\em 状态 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88}{State} \{ \hyperlink{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f}{R\+E\+A\+D\+Y}, 
\hyperlink{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b}{R\+U\+N\+N\+I\+N\+G}, 
\hyperlink{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312}{E\+X\+I\+T\+I\+N\+G}, 
\hyperlink{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641}{E\+X\+I\+T}
 \}\begin{DoxyCompactList}\small\item\em 状态 \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classsock_1_1net_1_1_event_loop_a331c5606120916c4b979e09cdad08b68}{Event\+Loop} (int id=-\/1)
\item 
\hyperlink{classsock_1_1net_1_1_event_loop_a8b6e605d5352b92fa0d5b55682179162}{$\sim$\+Event\+Loop} (void)
\item 
void \hyperlink{classsock_1_1net_1_1_event_loop_a79368440ea6f81c4c2f2bfe31c1975fb}{queue} (boost\+::function$<$ void(void)$>$ handler)
\item 
void \hyperlink{classsock_1_1net_1_1_event_loop_a2c3528af20401c5bcaa7c8ddfe831d2d}{run} (void)
\begin{DoxyCompactList}\small\item\em 执行循环 \end{DoxyCompactList}\item 
void \hyperlink{classsock_1_1net_1_1_event_loop_a2115323b7b33ddab22e986c64c2741a8}{stop} (void)
\begin{DoxyCompactList}\small\item\em 停止循环 \end{DoxyCompactList}\item 
\hyperlink{structsock_1_1net_1_1_event_loop_1_1_statics}{Statics} \hyperlink{classsock_1_1net_1_1_event_loop_a4f46094758e91bfc921609f5c9c70100}{get\+Statics} (void)
\begin{DoxyCompactList}\small\item\em 获取循环状态 \end{DoxyCompactList}\item 
int \hyperlink{classsock_1_1net_1_1_event_loop_a97b81fbb8899340ab54f8a6240964925}{get\+Id} (void) const 
\begin{DoxyCompactList}\small\item\em 获取循环\+I\+D \end{DoxyCompactList}\item 
void \hyperlink{classsock_1_1net_1_1_event_loop_a388a74d15d9d5d8b7b4cf52fb07678f6}{set\+Frame\+Time} (base\+::mtime\+\_\+t time)
\begin{DoxyCompactList}\small\item\em 设置帧时间 \end{DoxyCompactList}\item 
\hyperlink{namespacesock_1_1net_af8e0f3d2c4f0c2125945c1db54739b23}{Reactor\+Ptr} \& \hyperlink{classsock_1_1net_1_1_event_loop_a0f3092aa884148977206a30fc13d1385}{get\+Reactor} (void)
\begin{DoxyCompactList}\small\item\em 获取循环的网络反应器 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
事件循环 

\subsection{Member Enumeration Documentation}
\hypertarget{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!State@{State}}
\index{State@{State}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{State}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf sock\+::net\+::\+Event\+Loop\+::\+State}}\label{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88}


状态 

\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{R\+E\+A\+D\+Y@{R\+E\+A\+D\+Y}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!R\+E\+A\+D\+Y@{R\+E\+A\+D\+Y}}\item[{\em 
\hypertarget{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f}{}R\+E\+A\+D\+Y\label{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88aff92513eda03d0bee067d93b99688b0f}
}]\index{R\+U\+N\+N\+I\+N\+G@{R\+U\+N\+N\+I\+N\+G}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!R\+U\+N\+N\+I\+N\+G@{R\+U\+N\+N\+I\+N\+G}}\item[{\em 
\hypertarget{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b}{}R\+U\+N\+N\+I\+N\+G\label{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a8cc318f0008034a401cf529e3c299e5b}
}]\index{E\+X\+I\+T\+I\+N\+G@{E\+X\+I\+T\+I\+N\+G}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!E\+X\+I\+T\+I\+N\+G@{E\+X\+I\+T\+I\+N\+G}}\item[{\em 
\hypertarget{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312}{}E\+X\+I\+T\+I\+N\+G\label{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a0aad4d1bdc7231fe13e2e4a99aa58312}
}]\index{E\+X\+I\+T@{E\+X\+I\+T}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!E\+X\+I\+T@{E\+X\+I\+T}}\item[{\em 
\hypertarget{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641}{}E\+X\+I\+T\label{classsock_1_1net_1_1_event_loop_ab28d6bf1c548153366f543d2609b1d88a225dce8b187e8f43cb56c45c6f0a9641}
}]\end{description}
\end{Desc}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classsock_1_1net_1_1_event_loop_a331c5606120916c4b979e09cdad08b68}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!Event\+Loop@{Event\+Loop}}
\index{Event\+Loop@{Event\+Loop}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{Event\+Loop(int id=-\/1)}]{\setlength{\rightskip}{0pt plus 5cm}Event\+Loop\+::\+Event\+Loop (
\begin{DoxyParamCaption}
\item[{int}]{id = {\ttfamily -\/1}}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_event_loop_a331c5606120916c4b979e09cdad08b68}
\hypertarget{classsock_1_1net_1_1_event_loop_a8b6e605d5352b92fa0d5b55682179162}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!````~Event\+Loop@{$\sim$\+Event\+Loop}}
\index{````~Event\+Loop@{$\sim$\+Event\+Loop}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{$\sim$\+Event\+Loop(void)}]{\setlength{\rightskip}{0pt plus 5cm}Event\+Loop\+::$\sim$\+Event\+Loop (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_event_loop_a8b6e605d5352b92fa0d5b55682179162}


\subsection{Member Function Documentation}
\hypertarget{classsock_1_1net_1_1_event_loop_a97b81fbb8899340ab54f8a6240964925}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!get\+Id@{get\+Id}}
\index{get\+Id@{get\+Id}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{get\+Id(void) const }]{\setlength{\rightskip}{0pt plus 5cm}int sock\+::net\+::\+Event\+Loop\+::get\+Id (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_event_loop_a97b81fbb8899340ab54f8a6240964925}


获取循环\+I\+D 

\hypertarget{classsock_1_1net_1_1_event_loop_a0f3092aa884148977206a30fc13d1385}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!get\+Reactor@{get\+Reactor}}
\index{get\+Reactor@{get\+Reactor}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{get\+Reactor(void)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Reactor\+Ptr}\& sock\+::net\+::\+Event\+Loop\+::get\+Reactor (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_event_loop_a0f3092aa884148977206a30fc13d1385}


获取循环的网络反应器 

\begin{DoxyReturn}{Returns}
Reactor\+Ptr\& 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_event_loop_a4f46094758e91bfc921609f5c9c70100}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!get\+Statics@{get\+Statics}}
\index{get\+Statics@{get\+Statics}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{get\+Statics(void)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Statics} sock\+::net\+::\+Event\+Loop\+::get\+Statics (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_event_loop_a4f46094758e91bfc921609f5c9c70100}


获取循环状态 

\hypertarget{classsock_1_1net_1_1_event_loop_a79368440ea6f81c4c2f2bfe31c1975fb}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!queue@{queue}}
\index{queue@{queue}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{queue(boost\+::function$<$ void(void)$>$ handler)}]{\setlength{\rightskip}{0pt plus 5cm}void Event\+Loop\+::queue (
\begin{DoxyParamCaption}
\item[{boost\+::function$<$ void(void)$>$}]{handler}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_event_loop_a79368440ea6f81c4c2f2bfe31c1975fb}
向事件循环添加一个事件 
\begin{DoxyParams}{Parameters}
{\em handler} & 回调函数 \\
\hline
\end{DoxyParams}
\hypertarget{classsock_1_1net_1_1_event_loop_a2c3528af20401c5bcaa7c8ddfe831d2d}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!run@{run}}
\index{run@{run}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{run(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Event\+Loop\+::run (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_event_loop_a2c3528af20401c5bcaa7c8ddfe831d2d}


执行循环 

\hypertarget{classsock_1_1net_1_1_event_loop_a388a74d15d9d5d8b7b4cf52fb07678f6}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!set\+Frame\+Time@{set\+Frame\+Time}}
\index{set\+Frame\+Time@{set\+Frame\+Time}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{set\+Frame\+Time(base\+::mtime\+\_\+t time)}]{\setlength{\rightskip}{0pt plus 5cm}void sock\+::net\+::\+Event\+Loop\+::set\+Frame\+Time (
\begin{DoxyParamCaption}
\item[{base\+::mtime\+\_\+t}]{time}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_event_loop_a388a74d15d9d5d8b7b4cf52fb07678f6}


设置帧时间 


\begin{DoxyParams}{Parameters}
{\em time} & 帧时间 \\
\hline
\end{DoxyParams}
\hypertarget{classsock_1_1net_1_1_event_loop_a2115323b7b33ddab22e986c64c2741a8}{}\index{sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}!stop@{stop}}
\index{stop@{stop}!sock\+::net\+::\+Event\+Loop@{sock\+::net\+::\+Event\+Loop}}
\subsubsection[{stop(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Event\+Loop\+::stop (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_event_loop_a2115323b7b33ddab22e986c64c2741a8}


停止循环 



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
E\+:/git/sock/sock/net/\hyperlink{event__loop_8h}{event\+\_\+loop.\+h}\item 
E\+:/git/sock/src/net/\hyperlink{event__loop_8cc}{event\+\_\+loop.\+cc}\end{DoxyCompactItemize}
